Skip to content

[6.19.z] fix Future Dated Subs Test - #20882

Merged
Satellite-QE merged 1 commit into
6.19.zfrom
cherry-pick-6.19.z-fdaa318f75ff5a18c6cc600850e1788a6a01981f
Feb 26, 2026
Merged

[6.19.z] fix Future Dated Subs Test#20882
Satellite-QE merged 1 commit into
6.19.zfrom
cherry-pick-6.19.z-fdaa318f75ff5a18c6cc600850e1788a6a01981f

Conversation

@Satellite-QE

@Satellite-QE Satellite-QE commented Feb 26, 2026

Copy link
Copy Markdown
Collaborator

Cherrypick of PR: #20873

  • Fix future-dated subscription UI test by ensuring the manifest is uploaded within the test rather than implicitly in the fixture.
trigger: test-robottelo
pytest: tests/foreman/ui/test_subscription.py -k "test_positive_populate_future_date_subcription"

Summary by Sourcery

Bug Fixes:

  • Fix future-dated subscription UI test by uploading the manifest within the test using the future-dated manifest fixture.

* fixFutureDateSubsTest

* Address comment

* changeFunctionComment

(cherry picked from commit fdaa318)
@Satellite-QE Satellite-QE added 6.19.z Auto_Cherry_Picked Automatically cherrypicked PR using GHA No-CherryPick PR doesnt need CherryPick to previous branches labels Feb 26, 2026
@Satellite-QE

Copy link
Copy Markdown
Collaborator Author

trigger: test-robottelo
pytest: tests/foreman/ui/test_subscription.py -k "test_positive_populate_future_date_subcription"

@Satellite-QE Satellite-QE added the AutoMerge_Cherry_Picked The cherrypicked PRs of master PR would be automerged if all checks passing label Feb 26, 2026
@sourcery-ai

sourcery-ai Bot commented Feb 26, 2026

Copy link
Copy Markdown
Contributor
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adjusts the future-dated subscription manifest fixture to only provide manifest content and moves the manifest upload into the specific UI test so the test explicitly controls when and where the manifest is uploaded.

Sequence diagram for future-dated subscription manifest upload in UI test

sequenceDiagram
    actor Tester
    participant Pytest as PytestRunner
    participant Test as test_positive_populate_future_date_subcription
    participant Fixture as func_future_dated_subscription_manifest
    participant Manifester as Manifester
    participant TargetSat as target_sat
    participant Satellite as SatelliteServer

    Tester ->> Pytest: run tests/foreman/ui/test_subscription.py
    Pytest ->> Test: execute test_positive_populate_future_date_subcription

    Test ->> Fixture: request func_future_dated_subscription_manifest
    activate Fixture
    Fixture ->> Manifester: __enter__(manifest_category=future_date_subscription)
    activate Manifester
    Manifester -->> Fixture: manifest (with content)
    Fixture -->> Test: yield manifest
    deactivate Manifester
    deactivate Fixture

    Note over Test,TargetSat: Manifest upload is now explicitly controlled by the test

    Test ->> TargetSat: upload_manifest(function_org.id, manifest.content)
    activate TargetSat
    TargetSat ->> Satellite: store manifest for organization
    Satellite -->> TargetSat: manifest stored
    deactivate TargetSat

    Test -->> Pytest: assertions on future-dated subscription UI
    Pytest -->> Tester: test result
Loading

File-Level Changes

Change Details Files
Decouple future-dated subscription manifest creation from uploading to Satellite so tests can explicitly perform the upload.
  • Change the future-dated subscription manifest fixture to no longer depend on target_sat and function_org
  • Update the fixture docstring to reflect that it only returns a manifest for future-dated subscription scenarios
  • Use a context-managed Manifester and yield the manifest instead of returning after upload
pytest_fixtures/component/taxonomy.py
Make the future-dated subscription UI test upload the manifest explicitly as part of its setup.
  • Call target_sat.upload_manifest with function_org.id and the manifest content from the fixture at the start of the test
  • Keep the existing UI session flow but rely on the explicit upload for the manifest presence assertion
tests/foreman/ui/test_subscription.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@Satellite-QE
Satellite-QE merged commit 269eb9a into 6.19.z Feb 26, 2026
17 of 18 checks passed
@Satellite-QE
Satellite-QE deleted the cherry-pick-6.19.z-fdaa318f75ff5a18c6cc600850e1788a6a01981f branch February 26, 2026 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.19.z Auto_Cherry_Picked Automatically cherrypicked PR using GHA AutoMerge_Cherry_Picked The cherrypicked PRs of master PR would be automerged if all checks passing No-CherryPick PR doesnt need CherryPick to previous branches

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants